<!--  -->
<template>
<div>
     <div class='recursion_warp' v-for='(item,index) in list' :key='index' @click.stop='recursion_click($event)'>
      {{item.name}}
      <recursion :list='item.list'></recursion>
  </div>
</div>
 
</template>

<script>
import { getRandomCode } from '../../utils/utiltoo'
import recursion from '../recursion/index'
export default {
    name:'recursion',
    props:['list'],
  data () {
    return {
    };
  },

  components: {
      recursion
  },

  computed: {},

  mounted(){
  },

  methods: {
      recursion_click(e){
          if(!e.target.childNodes[1])return;
          if(e.target.childNodes[1].style.display == 'none'){
            e.target.childNodes[1].style.display = 'block'
          }else{
            e.target.childNodes[1].style.display = 'none'
          }
      },
  }
}

</script>
<style lang='scss' scoped>
.recursion_warp{
    width: 100px;
    min-height: 20px;
    position: relative;
    left:5px;
    justify-content: start;
}
</style>